class CreateShopProducts < ActiveRecord::Migration
  def self.up
    create_table :shop_products do |t|
      t.references :shop_address
      t.references :product
      t.decimal :price

      t.timestamps
    end

    add_index :shop_products, [:shop_address_id, :product_id], :unique => true
  end

  def self.down
    drop_table :shop_products
  end
end
